using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class SD_PKT_EvalMap : EntityTypeConfiguration<SD_PKT_Eval>
    {
        public SD_PKT_EvalMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.ID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.Number)
                .HasMaxLength(20);

            this.Property(t => t.Status)
                .HasMaxLength(2);

            this.Property(t => t.RecordType)
                .HasMaxLength(20);

            this.Property(t => t.RecordID)
                .HasMaxLength(20);

            this.Property(t => t.Others)
                .HasMaxLength(50);

            this.Property(t => t.OralMedicine)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.Periodontics)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.Surgery)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.Restorative)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.Endodontics)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.FixedProsthodontic)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.RemovableProsthodontic)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.Orthodontic)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.PediatricDentistry)
                .IsFixedLength()
                .HasMaxLength(1);

            // Table & Column Mappings
            this.ToTable("SD_PKT_Eval");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Number).HasColumnName("Number");
            this.Property(t => t.Teacher).HasColumnName("Teacher");
            this.Property(t => t.Assign_Note).HasColumnName("Assign_Note");
            this.Property(t => t.Submit_Note).HasColumnName("Submit_Note");
            this.Property(t => t.Eval_Note).HasColumnName("Eval_Note");
            this.Property(t => t.CreatedBy).HasColumnName("CreatedBy");
            this.Property(t => t.AssignedBy).HasColumnName("AssignedBy");
            this.Property(t => t.SubmittedBy).HasColumnName("SubmittedBy");
            this.Property(t => t.EvaluatedBy).HasColumnName("EvaluatedBy");
            this.Property(t => t.CreatedOn).HasColumnName("CreatedOn");
            this.Property(t => t.AssignedOn).HasColumnName("AssignedOn");
            this.Property(t => t.SubmittedOn).HasColumnName("SubmittedOn");
            this.Property(t => t.EvaluatedOn).HasColumnName("EvaluatedOn");
            this.Property(t => t.Grade).HasColumnName("Grade");
            this.Property(t => t.Status).HasColumnName("Status");
            this.Property(t => t.SPID).HasColumnName("SPID");
            this.Property(t => t.C_Teacher).HasColumnName("_Teacher");
            this.Property(t => t.C_Course).HasColumnName("_Course");
            this.Property(t => t.Reg).HasColumnName("Reg");
            this.Property(t => t.RecordType).HasColumnName("RecordType");
            this.Property(t => t.RecordID).HasColumnName("RecordID");
            this.Property(t => t.Xray).HasColumnName("Xray");
            this.Property(t => t.Bitewings).HasColumnName("Bitewings");
            this.Property(t => t.L).HasColumnName("L");
            this.Property(t => t.R).HasColumnName("R");
            this.Property(t => t.Studymodel).HasColumnName("Studymodel");
            this.Property(t => t.Occlusal).HasColumnName("Occlusal");
            this.Property(t => t.Maxilla).HasColumnName("Maxilla");
            this.Property(t => t.Mandible).HasColumnName("Mandible");
            this.Property(t => t.OPG).HasColumnName("OPG");
            this.Property(t => t.Cephalometric).HasColumnName("Cephalometric");
            this.Property(t => t.MedicalLabProcedure).HasColumnName("MedicalLabProcedure");
            this.Property(t => t.Others).HasColumnName("Others");
            this.Property(t => t.EV_Date).HasColumnName("EV_Date");
            this.Property(t => t.OralMedicine).HasColumnName("OralMedicine");
            this.Property(t => t.Periodontics).HasColumnName("Periodontics");
            this.Property(t => t.Surgery).HasColumnName("Surgery");
            this.Property(t => t.Restorative).HasColumnName("Restorative");
            this.Property(t => t.Endodontics).HasColumnName("Endodontics");
            this.Property(t => t.FixedProsthodontic).HasColumnName("FixedProsthodontic");
            this.Property(t => t.RemovableProsthodontic).HasColumnName("RemovableProsthodontic");
            this.Property(t => t.Orthodontic).HasColumnName("Orthodontic");
            this.Property(t => t.PediatricDentistry).HasColumnName("PediatricDentistry");
            this.Property(t => t.Brought_by_Student).HasColumnName("Brought_by_Student");
        }
    }
}
